Deleted unused files.
[Sonic-Engine-360.git] / GMS2 / Sonic Engine 360 / objects / DepthLayerParent / Step_1.gml
blobdea99d7500ea06713ed0ddc5cc6333e23a23d83c
1 /// Switch depth layers depending on direction, this then sets all walls at this depth to non-solid\r
2 // -> Note depth for layered objects can be set in their room instance creation code as well as the object itself!\r
3 \r
4 var layer_deact;\r
5 with (Player)\r
6 {\r
7     if (place_meeting(x, y, other))  //standard collision\r
8     {\r
9         // Get layer to deactivate depending on Player hspeed direction, the layer values are set in the layer objects creation events\r
10         if (hsp > 0)\r
11             layer_deact = other.L1;\r
12         else\r
13             layer_deact = other.L2;\r
15         // Deactivate walls with depth set at the layer_deact value\r
16         if (depth_layer != layer_deact)\r
17         {\r
18             depth_layer = layer_deact;\r
19             with (WallParent)\r
20             {\r
21                 solid = (depth != layer_deact);\r
22             }\r
23         }\r
24     }\r
25 }\r